#define _CRT_SECURE_NO_WARNINGS 1
#include<stdio.h>
int arr1[] = { 1,2,3,4,5,6,7,8,9,10 };
void* my_memmove(void* pd, const void* ps, size_t num)
{
	void* star = pd;
	if (pd < ps)
	{
		while (num--)
		{
			*(char*)pd = *(char*)ps;
			pd = (char*)pd + 1;
			ps = (char*)ps + 1;
		}
	}
	else
	{
		while (num--)
		{
			*((char*)pd + num) = *((char*)ps + num);
		}
	}
	return star;
}
int main()
{
	my_memmove(arr1 + 2, arr1, 20);
	int i = 0;
	for (i = 0; i < 10; i++)
	{
		printf("%d ", arr1[i]);
	}
	return 0;
}